function newBox(x1, y1, x2, y2)
   Box = { }
   Box.x1 = x1
   Box.y1 = y1
   Box.x2 = x2
   Box.y2 = y2
   return Box
end

function Stylus.newPressinBox(Box, x, y)
   local ret = false
   if Stylus.newPress then
   if x > Box.x1 and x < Box.x2 and y > Box.y1 and y < Box.y2 and Stylus.released then ret = true end
   return ret
   end
end

function Stylus.heldinBox(Box, x, y)
   local ret = false
   if Stylus.held then
   if x > Box.x1 and x < Box.x2 and y > Box.y1 and y < Box.y2 then ret = true end
   return ret
   end
end

function Stylus.doubleClickinBox(Box, x, y)
   local ret = false
   if Stylus.doubleClick then
   if x > Box.x1 and x < Box.x2 and y > Box.y1 and y < Box.y2 then ret = true end
   return ret
   end
end
